package com.miracle.main.module.mvp.presenter;

import android.support.v4.app.Fragment;

import com.miracle.basemvp.base.BasePresenter;
import com.miracle.basemvp.base.BaseResponse;
import com.miracle.basemvp.base.IPresenter;
import com.miracle.basemvp.base.state.StateController;
import com.miracle.basemvp.lifecycle.rx.RxDefaultObserver;
import com.miracle.common.mvp.entity.response.BaseListResponse;
import com.miracle.common.util.CommonConstants;
import com.miracle.common.util.PreferencesUtils;
import com.miracle.common.view.RefreshView;
import com.miracle.main.module.mvp.contract.SecretContract;
import com.miracle.main.module.mvp.contract.SecretContract2;
import com.miracle.main.module.mvp.entity.bean.SecretBean;
import com.miracle.main.module.mvp.entity.request.SecretListRequest;
import com.trello.rxlifecycle2.LifecycleProvider;
import com.trello.rxlifecycle2.android.FragmentEvent;

import javax.inject.Inject;

/**
 * com.miracle.main.module.mvp.presenter
 * (c)2018 AIR Times Inc. All rights reserved.
 *
 *
 * @author WangJQ
 * @version 1.0
 * @date 2018/7/7 9:19
 * @see com.miracle.main.module.mvp.presenter
 */
public class SecretPresenter2 extends BasePresenter<SecretContract2.View, SecretContract2.Model>
        implements IPresenter {
    @Inject
    public SecretPresenter2(SecretContract2.View view, SecretContract2.Model model) {
        super(view, model);
    }

//    public void getList(LifecycleProvider<FragmentEvent> lifecycleProvider, SecretListRequest
//            request, RefreshView refreshView) {
//        String session = PreferencesUtils.getPreferences(((Fragment) mView).getActivity(),
//                PreferencesUtils.State
//                        .USER_SESSIONID);
//        request.setJSESSIONID(session);
//        request.setUri(CommonConstants.URI.URI_SAY_LIST);
//        request.setPageNo(refreshView.getCurrPage());
//        request.setPageSize(refreshView.get);
//        mModel.getList(request)
//                .compose(lifecycleProvider
//                        .<BaseResponse<BaseListResponse<SecretBean>>>bindUntilEvent
//                                (FragmentEvent.DESTROY))
//                .subscribe(observer);
//    }
}
